@echo off
REM This is for using Xming which has already set up X server.
REM Optionally set screen number to something other than 1.
REM Screen number is not the same thing as a display.
IF "%1" == "" (
	set SCREEN_NBR=0
) ELSE (
	set SCREEN_NBR=%1
)
@echo on
echo SCREEN_NBR=%SCREEN_NBR%
SET DISPLAY=127.0.0.1:0.0
C:
@echo off
SET CYGWIN_ROOT=\cygwin-1.7
SET BIN_DIR=%CYGWIN_ROOT%\bin
IF exist %BIN_DIR% (
	chdir %BIN_DIR%
) ELSE (
	echo Error directory, %BIN_DIR%, does not exist.  Exiting...
	goto CLEANUP-FINISH
)
.\bash --login -c "cd /bin;export DISPLAY=%DISPLAY%;./fvwm"
:CLEANUP-FINISH
